{extend name="public/base"/}
{block name="style"}

{/block}
{block name="body"}
<style>
.menuBox{position:absolute;top:20px; left:150px;width:600px; height:35px;}
.menuBox li{float:left;width:65px; height:32px;line-height:32px; text-align:center; font-size:18px;-moz-border-radius:5px;border-radius:5px;}
.menuBox .hove{background:#3baa24; color:#FFF}
.menuBox .hove a{display:block;color:#FFF}
.comHe {
    width: 750px;
    height: 32px;
    line-height: 32px;
    padding: 0 12px;
    background: #fafafa;
    margin: 15px auto 0;
}
.nr {
    padding: 32px 50px 44px 60px;
    overflow: hidden;
}
.shj,.zp{font-size: 12px;}
.shj .tit h2 s{width: 23px; height: 23px; background-position: -25px 0;}
ul li{overflow: hidden;}
.comNr .book_cov{width: 80px; height: 100px; float: left; margin-right: 20px;}
.comNr .book_inf{width: 390px; float: left; overflow: hidden;}
.comNr .book_inf h3{margin-bottom: 4px;}
.comNr p{line-height: 22px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
.comNr p span{color: #333;}
.comNr .book_inf .int{line-height: 16px;}
.comNr .right{float: right; overflow: hidden; text-align: right;}
.comNr .right .rb{overflow: hidden; margin-top: 58px;}
.comNr .right .rb .sBtn{width: 88px; height: 26px; line-height: 26px; text-align: center; background: #f26552; color: #fff; border-radius: 2px;float: right;margin-right: 50px}
.comNr .right .rb .sBtn:hover{background: #e5533f;}
.comNr .right .rb .qBtn{float: right;}
.comNr .right .rb .qBtn s{width: 15px; height: 24px; background-position: -51px 0; margin-left: 28px;  float: right; }
.comNr .right .rb a:hover s{background-position: -67px 0;}
</style>
{include file="public/header" /}

<div class="pageBox userBox" style="height:800px" >
    <div class="userLeft">
        <div class="headPic">
            {if $avatar ==""}
            <img id="userPicShow" src="__PUBLIC__/novel/images/ser.png"/>
            {else}
            <img id="userPicShow" src="{$avatar}"/>
            {/if}
            <span>{$nickname}</span>
        </div>
        <ul>
            <li ><a href="/personal/info">我的主页</a></li>
            <li class="liHove"><a href="/personal/bookcase">我的书架</a></li>
            <li ><a href="/personal/review">我的书评</a></li>
            <li ><a href="/personal/paylog/">充值记录</a></li>
			<li ><a href="/personal/history/">阅读历史</a></li>
            <li ><a href="/personal/moneylog/">订阅记录</a></li>
            <li ><a href="/personal/bonuslog/">打赏记录</a></li>
			<li ><a href="{:config('writer_url')}">作家中心</a></li>
        </ul>    
    </div>
    <div class="userRight">
        <div class="Tit caseIco">我的书架<span>全部藏书</span></div>
        <div class="shj">
            <div class="comHe">
                <span>一共收藏{$count}本书</span>
            </div>
            <div class="nr comNr">
                <ul>
                    {volist name="list" id="vo"}
                    <li style="padding:10px 0 10px 0;border-bottom:1px solid #c6c6c6">
                        <a target="_blank" href="{:url('/book/info',array("id"=>$vo.articleid))}" class="book_cov"><img src="{$Think.config.web_site_url}{$vo.articleid|get_novel=###,'cover'}" alt="{$vo.articlename}" style="width:80px;height:auto"></a>
                        <div class="book_inf">
                            <a target="_blank" href="{:url('/book/info',array("id"=>$vo.articleid))}"><span style="font-size:16px">{$vo.articlename}</span></a>
                            <p>
                                <span>上次阅读：</span>
                                {if $chapters[$key]['history']}
                                 <a target="_blank" href="{$Think.config.web_pc_url}/chapter/read/{$vo.articleid}/{$chapters[$key]['history']['id']}.html">{$chapters[$key]['history']['chaptername']}</a>
                                {else}
                                -
                                {/if}
                             </p>
                            <p><span>最新章节：</span><a target="_blank" href="{$Think.config.web_pc_url}/chapter/read/{$vo.articleid}/{$chapters[$key]['id']}.html">{$chapters[$key]['chaptername']}</a></p>
                            <div class="int" style="color:#afb0b0">
                                {$chapters[$key]['content']}...
                            </div>
                        </div>
                        <div class="right">
                            <span  style="color:#afb0b0">收藏时间：{$vo['create_time']|date='Y-m-d H:i:s',###}</span>
                            <div class="rb" style="position:relative">
                                <a target="_blank" href="{:url('/book/info',array("id"=>$vo.articleid))}" class="sBtn" >立即阅读</a>
                                <a href="javascript:;" onclick="deletec({$vo.id})" class="qBtn"><img src="__PUBLIC__/novel/images/rubbish-bin.png" style="position:absolute;width:20px;height:auto;left:140px"/></a>
                            </div>
                        </div>
                    </li>
                    {/volist}
                </ul>
                <div style="text-align:center;margin:0 auto">{$page}</div>
            </div>
        </div>
        <!--<div class="userCaseBox">
            <ul class="clearfix">
				{volist name="list" id="vo"}
                    <li>
                    	<a target="_blank" href="{:url('/book/info',array("id"=>$vo.articleid))}">
                    		<img src="{$Think.config.web_site_url}{$vo.articleid|get_document_field='novel',###,'id','cover'}">
                    	</a>
                    	<span>{$vo.articlename}</span>
                    	<span>
                    		<a target="_blank" href="http://www.xiaoshuokong.com/book/237/chapter/0/show/">继续阅读</a>
                    	</span>
                    </li>
                {/volist}                
            </ul>
        </div>
        <div style="text-align:center;margin:0 auto">{$page}</div>
        -->
    </div>
</div>
{block name="include"}{include file="public:footer" /}{/block}
{/block}
{block name="script"}
	<script type="text/javascript" src="__PUBLIC__/novel/js/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/novel/js/common.js"></script>
	<script type="text/javascript">
		
		function deletec(id){

			query = {'bookcaseid':id};
			$.ajax({
                type: 'POST',
                url:'/personal/bookcase/',
				data : query,
                dataType: 'json',
                success: function(json){
                    window.location.reload();
                },
                error: function(xhr, type){
                	message(2,'操作失败')
                }
            });
		};
	</script>
{/block}